﻿@model Project.WebUI.Models.LogOnModel
@using Project.Resource.User
@{
    ViewBag.Title = "Gamebetplus - Login";
    var status = "";
    if (ViewBag.success == "0")
    {
        status = "0";
    }
    if (ViewBag.success=="1")
    {
        status = "1";
    }
}

<section class="container clearfix">
    <div class="left_content">
        <div id="deposit_ajax">

        </div>
        <div id="withdraw_ajax">

        </div>
        <script type="text/javascript">
            $(document).ready(function () {
                LoadDepositAjax(root, "ListDeposit", 1);
                LoadWithDrawAjax(root, "ListWithdraw", 1);
            });
        </script>
    </div>
    <div class="info">
        <div style="padding-left: 60px; color: #6db1f2; font-size: 14px; font-weight: bold; margin-top:10px;">
            @RegisterResource.LoginTitle <font style="font-size: 12px; font-style: italic; font-weight: normal;">@RegisterResource.Requiredfields</font>
        </div>
        @using (Html.BeginForm("Login", "User", FormMethod.Post, new { id = "formRegister" }))
        {
            @Html.AntiForgeryToken()            
        <table cellpadding="0" cellspacing="0" border="0" style="color: #444242; width:600px;">                        
            <tr>
                <td colspan="2" height="15"></td>
            </tr>
            <tr>
                <td class="content_td" >
                    @RegisterResource.lblUserName&nbsp;<font color="#2b8eef">*</font>
                </td>
                <td >
                    @Html.TextBoxFor(m => m.UserName, new { id = "txtEmail", @class = "cf_input",style="width:180px !important;" })                    
                </td>
                <td>
                        @Html.ValidationMessageFor(m => m.UserName)                                        
                </td>
            </tr>
            <tr>
                <td colspan="2" height="10"></td>
            </tr>
            <tr>
                <td class="content_td" >
                    @RegisterResource.lblPassword&nbsp;<font color="#2b8eef">*</font></td>
                <td>
                     @Html.TextBoxFor(m => m.Password, new { type = "password", id = "Password", @class = "cf_input" })                                        
                </td>
                <td>
                    @Html.ValidationMessageFor(m => m.Password)
                </td>
            </tr>                        
            <tr>                                                              
                <td colspan="2" height="30"></td>
            </tr>           
        </table>
        <div style="text-align: left; margin-left:144px; margin-bottom:5px; " >
            <input type="submit" name="sbReg" id="sbReg" value="@RegisterResource.Submit" class="button" style="height:30px;" />
        </div>
        }
    </div>    
</section>
<div id="pass_incorrect" title="Login" style="display: none;">
    Login unsuccessfully!. Username or Password is incorrect
</div>
<script type="text/javascript">
    var id = "pass_incorrect";
    if ("@status" == "0") {
        popupLogin(id);
    }

    if ("@status" == "1") {
        location.href = "/";
    }
</script>
